/*
 * @Author: your name
 * @Date: 2021-02-19 14:25:03
 * @LastEditTime: 2021-04-11 17:51:07
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \guzheng\src\router\index.js
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/auth/login.vue'
import Register from '../views/auth/register.vue'
import IndexMain from '../component/index-main.vue'
import IntroBrief from  '../views/pages/1.1.1intro-brief.vue'
import IntroDevelopment from  '../views/pages/1.1.2intro-development.vue'
import IntroGenre from  '../views/pages/1.1.3intro-genre.vue'
import IntroMaterial from  '../views/pages/1.1.4intro-material.vue'
import IntroPictures from  '../views/pages/1.1.5intro-pictures.vue'
import IntroStructure from '../views/pages/1.2intro-structure.vue'
import IntroTone from  '../views/pages/1.3intro-tone.vue'
import IntroDiffer from  '../views/pages/1.4intro-differ.vue'
import LearnPrepareStrings from  '../views/pages/2.1.1learn-prepare-strings.vue'
import LearnPrepareToning from '../views/pages/2.1.2learn-prepare-toning'
import LearnPrepareSwitching from '../views/pages/2.1.3learn-prepare-switching'
import LearnPrepareNails from '../views/pages/2.1.4learn-prepare-nails.vue'
import LearnTechnBasic from '../views/pages/2.2learn-techn-basic.vue'
import LearnTechnFingertechn from '../views/pages/2.2learn-techn-fingertechn.vue'
import LearnMasterpiece from '../views/pages/2.3learn-masterpiece.vue'
import LearnLevels from '../views/pages/2.4learn-levels.vue'
import LearnMaintenance from '../views/pages/2.5learn-maintenance.vue'
import Communication from '../views/pages/3.communication.vue'
import Game from '../views/pages/4.game.vue'



Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    component: Login,
  },
  {
    path: '/register',
    component: Register,
  },
  {
    path: '/index',
    component: () => import('../views/pages/index.vue'),
    redirect: '/index/main',
    children: [
      {
        path: 'main',
        component: IndexMain,
      },
      {
        path: 'communication',
        component: Communication,
        meta: { title: '交流模块' }
      },
      {
        path: 'game',
        component: Game,
        meta: { title: '趣味游戏模块' }
      }
    ]
  },
  {
    path: '/introduction',
    component: () => import('../views/pages/index.vue'),
    meta: { title: '古筝介绍模块' },
    children: [
      {
        path: 'brief/intro-brief',
        component: IntroBrief,
        meta: { title: '古筝简介' }
      },
      {
        path: 'brief/intro-development',
        component: IntroDevelopment,
        meta: { title: '发展历程' }
      },
      {
        path: 'brief/intro-genre',
        component: IntroGenre,
        meta: { title: '主要流派' }
      },
      {
        path: 'brief/intro-material',
        component: IntroMaterial,
        meta: { title: '古筝材质' }
      },
      {
        path: 'brief/intro-pictures',
        component: IntroPictures,
        meta: { title: '古筝图片欣赏' }
      },
      {
        path: 'intro-structure',
        component: IntroStructure,
        meta: { title: '古筝结构详述' }
      },
      {
        path: 'intro-tone',
        component: IntroTone,
        meta: { title: '古筝琴音详述' }
      },
      {
        path: 'intro-differ',
        component: IntroDiffer,
        meta: { title: '古筝与古琴的区别与联系' }
      },
    ]
  },
  {
    path: '/learning',
    component: () => import('../views/pages/index.vue'),
    meta: { title: '学习模块' },
    children: [
      {
        path: 'learn-prepare/learn-prepare-strings',
        component: LearnPrepareStrings,
        meta: { title: '古筝调弦' }
      },
      {
        path: 'learn-prepare/learn-prepare-toning',
        component: LearnPrepareToning,
        meta: { title: '古筝调音' }
      },
      {
        path: 'learn-prepare/learn-prepare-nails',
        component: LearnPrepareNails,
        meta: { title: '调式间转换' }
      },
      {
        path: 'learn-prepare/learn-prepare-switching',
        component: LearnPrepareSwitching,
        meta: { title: '装戴古筝指甲' }
      },
      {
        path: 'learn-techn/learn-techn-basic',
        component: LearnTechnBasic,
        meta: { title: '基本演奏技法及练习曲' }
      },
      {
        path: 'learn-techn/learn-techn-fingertechn',
        component: LearnTechnFingertechn,
        meta: { title: '指法符号一览' }
      },
      {
        path: 'learn-masterpiece',
        component: LearnMasterpiece,
        meta: { title: '古筝名曲介绍' }
      },
      {
        path: 'learn-levels',
        component: LearnLevels,
        meta: { title: '曲谱一级到十级选' }
      },
      {
        path: 'learn-maintenance',
        component: LearnMaintenance,
        meta: { title: '古筝养护' }
      },
    ]
  },
];

const router = new VueRouter({
  routes,
  mode: 'history'
})

export default router
